package cn.stylefeng.guns.modular.basic.service;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.modular.basic.entity.BasicTray;
import cn.stylefeng.guns.modular.basic.model.params.BasicTrayParam;
import cn.stylefeng.guns.modular.basic.model.result.BasicTrayResult;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 托盘表 服务类
 * </p>
 *
 * @author hu
 * @since 2019-06-28
 */
public interface BasicTrayService extends IService<BasicTray> {

    /**
     * 新增
     *
     * @author hu
     * @Date 2019-06-28
     */
    void add(BasicTrayParam param);

    /**
     * 删除
     *
     * @author hu
     * @Date 2019-06-28
     */
    void delete(BasicTrayParam param);

    /**
     * 更新
     *
     * @author hu
     * @Date 2019-06-28
     */
    void update(BasicTrayParam param);

    /**
     * 查询单条数据，Specification模式
     *
     * @author hu
     * @Date 2019-06-28
     */
    BasicTrayResult findBySpec(BasicTrayParam param,Long operateId);

    /**
     * 查询列表，Specification模式
     *
     * @author hu
     * @Date 2019-06-28
     */
    List<BasicTrayResult> findListBySpec(BasicTrayParam param);

    /**
     * 查询分页数据，Specification模式
     *
     * @author hu
     * @Date 2019-06-28
     */
     LayuiPageInfo findPageBySpec(BasicTrayParam param, String condition,Long operateId);

     /**
      * 获取最后一条记录
      * @return
      */
	BasicTray findByThelastone();

	/**
	 * 保存list
	 * @param List<BasicTray>
	 */
	boolean saveBatchList(List<BasicTray> list);

	/**
	 * 批量更新
	 * @param List<BasicTrayParam>
	 */
	boolean batchupdate(List<BasicTrayParam> tList);

	Integer addReturnId(BasicTrayParam param);

	void deleteBySpec(BasicTrayParam param);

}
